{template paome_header}
<style type="text/css">
  .boardDiv{margin-bottom: 10px;}
  .boardList{margin: 10px auto;}
  .boardList li{list-style-type:none;float:left;margin:5px 9px;background-color:#dbeaf9;padding:5px 10px;cursor:pointer;border-radius: 3px;}
  .boardList label{float: left;margin-bottom: 0;}
  .boardList label input {float: left;margin-right: 5px;}
  .tagHot label {display: inline-block;}
</style>
<h4 style="padding-left:10px;">
  <span>大厅管理--官方资讯</span>
</h4>
<div class="tagInfo">
  <form enctype="multipart/form-data" method="post" action="index.php?c=paome_hall&a=hallAdvisory" class="form-horizontal" onsubmit="return subtn();">
      <div class="control-group">
        <label class="control-label">话题链接：</label>
        <div class="controls">
          <input type="text" name="topic_link" placeholder="请输入话题链接" value="{$historyInfo['topic_link']}">
          （例：joggers://topicSearch/#话题#）
        </div>
      </div>
      <div class="control-group">
        <label class="control-label">咨讯名称：</label>
        <div class="controls">
          <input type="text" name="advisory" placeholder="请输入资讯名称" value="{$historyInfo['advisory']}">
        </div>
      </div>
      <div class="control-group">
        <label class="control-label">咨讯链接：</label>
        <div class="controls">
          <input type="text" name="advisory_link" placeholder="请输入资讯链接" value="{$historyInfo['advisory_link']}">
        </div>
      </div>

      <div class="control-group">
        <div class="controls">
            <button type="submit" onclick="subtn" class="btn">提交</button>
        </div>
      </div>
  </form>
</div>

<script>
    function subtn(){
      var topicLink = $("[name=topic_link]").val();
      var advisory = $("[name=advisory]").val();
      var advisoryLink = $("[name=advisory_link]").val();
      if(topicLink == ''){
        alert("话题链接不能为空");
        return false;
      }
      if(advisory == ''){
        alert("资讯名称不能为空");
        return false;
      }
      if(advisoryLink == ''){
        alert("资讯链接不能为空");
        return false;
      }
      if(topicLink.indexOf('joggers://topicSearch/#') == -1){
        alert("话题链接格式不正确");
        return false;
      }
    }
</script>

{template footer}
